{extend name="index/base" /}
{block name='title'}To Be Evaluated{/block}
{block name='content'}

<div class="container clearfix my-5 pb-1">
    {include file="user/leftMenu" name="Reviews&Show" route="user/review"/}

    <div class="userBox">
            <div class="userH_tab clearfix">
                <a href="/user/review" class="on" >To Be Evaluated</a>
                <a href="/user/reviewmine" >My Reviews</a>


            </div>
            <div class="review-content">
                <div class="to-be-evaluated">
                    <div class="items" v-for="(item,index) in list" :key="index">
                        <div class="items-info">
                            <a class="d-block image">
                                <img :src="item.img" alt="Product">
                            </a>
                            <div class="info">
                                <h3 class="product-title">
                                    <a href="">{{item.name}}</a>
                                </h3>
                                <div class="price pb-2">{$money_f}{{item.price}}</div>

                                <div class="fs-sm">
                                    <span class="text-muted me-2">{{item.sku_name}}</span>
                                </div>
                            </div>
                        </div>
                        <div class="ps-sm-3 mx-auto mx-sm-0 text-center">
                            <a :href="'/user/goodscomment?id='+item.id" class="btn ">Reviews</a>
                        </div>
                    </div>


                <!-- <div class="empty-data">
                    <img src="https://css.zafcdn.com/imagecache/ZF_EN/images/pageimg/user_2019/review-empty.png" alt="empty-img">
                    <p class="empty-tip">Sorry, you haven't made any purchases yet.</p>
                </div> -->

            </div>
            <!-- Pagination-->
            <nav class="d-flex justify-content-center pt-2" aria-label="Page navigation">
                <el-pagination  background @current-change="handlePageChange" :page-size="listQuery.limit" @size-change="handlePageSizeChange"  layout="  prev, pager, next" :total="total"> </el-pagination>

            </nav>
        </div>
    </div>
</div>

{/block}
{block name='script'}

<script>

    layui.extend({

    }).use([], function () {
        initVue({
            data: {
                listQuery:{
                    activeState: 'wait',
                    limit: 15,
                    page:1,
                },
                list: [],
                total: 0,
                total_page: 0,
            },
            components: {
            },
            computed: {

            },
            created: function () {

            },
            mounted: function () {
                this._initData()
            },
            methods: {
                _initData:function(){
                    const that = this
                    this.$network('comment/goodsCommentLists',this.listQuery).then(function(res){
                        var data = res.data || {}
                        that.total = data.total || 0
                        that.total_page = data.total_page || 0
                        that.list = data.list ||[]

                    })
                },
                handlePageSizeChange:function(limit){
                    this.listQuery.limit = limit
                    this._initData()
                },
                handlePageChange:function(page) {
                    this.listQuery.page = page
                    this._initData()
                },

            },
        })


    })

</script>


{/block}